<?php
namespace app\api\validate;

use think\Validate;

/**
 * 管理员验证器
 * Class AdminUser
 * @package app\admin\validate
 */
class Order extends Validate
{
    protected $rule = [
        'cli_name'      => 'require|max:25|regex:^[\x80-\xff_a-zA-Z0-9]+$',
        'cli_mobile'    => 'require|regex:^1[34578]\d{9}$',
        'cli_wechat'    => 'regex:^[a-zA-Z]{1}[-_a-zA-Z0-9]{5,19}$',
    ];

    protected $message = [
        'cli_name.require'    => '请输入姓名',
        'cli_name.max'        => '姓名太长,请填写正确的姓名',
        'cli_name.regex'      => '姓名不能含有特殊字符', 
        'cli_mobile.require'  => '请输入手机号码',
        'cli_mobile.regex'    => '请输入正确的手机号码',
        'cli_wechat.regex'    => '请输入正确的微信号',
    ];
}